import request from '../../request/request_axios.js'

// 获取所有处方订单列表
export const listAllPrescriptionAPI = () => {
    return request({
        url: '/prescription/listAllPrescription',
        method: 'get'
    });
}

// 根据处方ID获取处方详情
export const getPrescriptionByIdAPI = (prescriptionId) => {
    return request({
        url: '/prescription/searchPrescriptionById',
        method: 'get',
        params: {
            prescriptionId: prescriptionId
        }
    });
}

// 更新处方状态（待付款 -> 待取药）
export const updatePrescriptionStatusAPI = (prescriptionId) => {
    return request({
        url: '/prescription/updateStatusToWait',
        method: 'post',
        params: {
            prescriptionId: prescriptionId
        }
    });
}
